﻿using NM.Module.SafeResponse.Middleware.Configurations;
using FrameworkCore.Modules.Startups;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

namespace NM.Module.SafeResponse.Middleware;

/// <summary>
/// 安全插件
/// </summary>
public class NetModulerStartup : INetModulerStartup
{
    public int Order => 700;

    public void Configure(IApplicationBuilder application)
    {
        //application.UseMiddleware<SafeResponseMiddleware>();
    }

    public void ConfigureServices(IServiceCollection services, IConfiguration configuration)
    {
        var config = ConfigurationsExtensions.AddJsonFile("safesettings");
        services.Configure<SecretSettings>(config.GetSection(SecretSettings.Key));
    }
}
